home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / strtod.z / strtod
Encoding:
Text File  |  2002-10-03  |  7.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ssssttttrrrrttttoooodddd((((3333CCCC))))                                                          ssssttttrrrrttttoooodddd((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_tttt_rrrr_tttt_oooo_dddd, _aaaa_tttt_oooo_ffff, _ssss_tttt_rrrr_tttt_oooo_llll_dddd, _aaaa_tttt_oooo_llll_dddd - convert string to double-precision or long
  10.      double-precision number
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh_>>>>
  14.  
  15.      _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_tttt_rrrr_tttt_oooo_dddd _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_nnnn_pppp_tttt_rrrr_,,,, _cccc_hhhh_aaaa_rrrr _****_****_eeee_nnnn_dddd_pppp_tttt_rrrr_))))_;;;;
  16.  
  17.      _dddd_oooo_uuuu_bbbb_llll_eeee _aaaa_tttt_oooo_ffff _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_nnnn_pppp_tttt_rrrr_))))_;;;;
  18.  
  19.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_tttt_rrrr_tttt_oooo_llll_dddd _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_nnnn_pppp_tttt_rrrr_,,,, _cccc_hhhh_aaaa_rrrr _****_****_eeee_nnnn_dddd_pppp_tttt_rrrr_))))_;;;;
  20.  
  21.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _aaaa_tttt_oooo_llll_dddd _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_nnnn_pppp_tttt_rrrr_))))_;;;;
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      (Note that the long double routines are only valid for the MIPSpro
  25.      compilers.)
  26.  
  27.      _ssss_tttt_rrrr_tttt_oooo_dddd returns as a double-precision floating-point number the value
  28.      represented by the character string pointed to by _n_p_t_r.
  29.      Similarly, _ssss_tttt_rrrr_tttt_oooo_llll_dddd returns as a long double-precision floating-point
  30.      number the value represented by the character string pointed to by _n_p_t_r.
  31.      Each function scans the string up to the first unrecognized character.
  32.  
  33.      _ssss_tttt_rrrr_tttt_oooo_dddd and _ssss_tttt_rrrr_tttt_oooo_llll_dddd recognize an optional string of ``white-space''
  34.      characters [as defined by _iiii_ssss_ssss_pppp_aaaa_cccc_eeee in _cccc_tttt_yyyy_pppp_eeee(3C)], then an optional sign,
  35.      then a string of digits optionally containing a decimal-point character
  36.      [as specified by the current locale; see _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)], then an optional
  37.      exponent part including an _eeee or _EEEE followed by an optional sign, followed
  38.      by an integer.
  39.  
  40.      If the value of _e_n_d_p_t_r is not _((((_cccc_hhhh_aaaa_rrrr _****_****_))))_NNNN_UUUU_LLLL_LLLL, a pointer to the character
  41.      terminating the scan is returned in the location pointed to by _e_n_d_p_t_r.
  42.      If no number can be formed, *_e_n_d_p_t_r is set to _n_p_t_r, and zero is returned.
  43.  
  44.      _aaaa_tttt_oooo_ffff_((((_nnnn_pppp_tttt_rrrr_)))) is equivalent to:
  45.           _ssss_tttt_rrrr_tttt_oooo_dddd_((((_nnnn_pppp_tttt_rrrr_,,,, _((((_cccc_hhhh_aaaa_rrrr _****_****_))))_NNNN_UUUU_LLLL_LLLL_)))).
  46.  
  47.      _aaaa_tttt_oooo_llll_dddd_((((_nnnn_pppp_tttt_rrrr_)))) is equivalent to:
  48.           _ssss_tttt_rrrr_tttt_oooo_llll_dddd_((((_nnnn_pppp_tttt_rrrr_,,,, _((((_cccc_hhhh_aaaa_rrrr _****_****_))))_NNNN_UUUU_LLLL_LLLL_)))).
  49.  
  50. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  51.      _cccc_tttt_yyyy_pppp_eeee(3C), _ssss_tttt_rrrr_tttt_oooo_llll(3C), _ssss_cccc_aaaa_nnnn_ffff(3S).
  52.  
  53. NNNNOOOOTTTTEEEE
  54.      Precision may be silently lost if the number of digits comprising the
  55.      floating-point number (i.e., not including the exponent) exceeds the
  56.      value of the constant DBL_DIG (LDBL_DIG) in _<<<<_ffff_llll_oooo_aaaa_tttt_...._hhhh_>>>>.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssttttrrrrttttoooodddd((((3333CCCC))))                                                          ssssttttrrrrttttoooodddd((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      As of IRIX 6.5.18, these functions accept hex strings of the form
  75.      _0000_xxxx_1111_...._xxxx_xxxx_xxxx_pppp_nnnn_nnnn, which are floating point constants. A floating constant has a
  76.      significand part that can be followed by an exponent part and a suffix
  77.      that specifies its type. The significand may include a digit sequence
  78.      that represents the whole-number part, followed by a period, followed by
  79.      a digit sequence that represents the fraction part. The exponent part is
  80.      composed of _eeee, _EEEE, _pppp, or _PPPP followed by an exponent that may contain an
  81.      optionally signed digit sequence. Either the whole number part or the
  82.      fraction part must be present; for decimal floating constants, either the
  83.      period or the exponent part has to be present. Example: _0000_xxxx_1111_...._ffff_ffff_ffff_pppp_++++_1111_0000.
  84.  
  85. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  86.      If the correct value would cause overflow, _++++_////_----_HHHH_UUUU_GGGG_EEEE______VVVV_AAAA_LLLL is returned
  87.      (according to the sign of the value), and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.
  88.  
  89.      If the correct value would cause underflow, zero is returned and _eeee_rrrr_rrrr_nnnn_oooo is
  90.      set to _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.